A sound collection’s “snd ” resources should be small, so as to minimize excessive memory usage. All the sounds are loaded into memory when the file is opened. Sounds that play by looping themselves (usually with a “freqCmd”) should be resource locked. Other sounds should not be resourced locked so the System can move unused sounds when memory fragmentation occurs. The locking status gets preserved when the sounds are moved into “temporary” memory.
PACE Resource
A ResEdit template for this resource exists in the Ambiance application itself. It consists of three elements. The first two are the minimum and maximum time between two played sounds. The times are in 1/60’s of a second. The interval between sounds is randomly determined based on this range. The last element is a toggle for activating sound playback in a sequential order. If toggled off, the sounds are chosen randomly. If toggled on, the sounds are played back in the order the sounds are in the file. This does not correspond to the ID numbers of the sounds. If you want the sounds to be played back by ID, select all of the sounds in ResEdit, cut, and paste. This reorders the sounds by ID instead of how old each sound is in the file.
“Get Info” Alert
When the user chooses “Get Info” from the File menu, Ambiance attempts to load in an “ALRT” resource of number 327. The “alert levels” of this alert should not activate a system beep, and they should all default to the “OK” button. The “DITL” resource should, of course, have its first element be this button. The button should be the only control. I recommend that for any text that you use, you use black and white “PICT” resources that are made with the Times typeface, 12 point for body text and 18 for headers. This is what is used in the About… alert and this documentation. For color elements, using “cicn” resources to allow you to specify different images for B&W and color systems.
The file can also have a “vers” resource for disclosing version and authorship information. Also, the file should be of type “ ß f i l ” and of creator “ å µ ∫ î.”